Optimal. Leaf size=120 \[ \frac {\left (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}+\frac {b \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^3(c+d x)}{3 a d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2916, 12, 908}
\begin {gather*} \frac {b \csc ^2(c+d x)}{2 a^2 d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d}+\frac {\left (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}-\frac {\csc ^3(c+d x)}{3 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 908
Rule 2916
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot ^4(c+d x)}{a+b \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {b^4 \left (b^2-x^2\right )^2}{x^4 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b^5 d}\\ &=\frac {\text {Subst}\left (\int \frac {\left (b^2-x^2\right )^2}{x^4 (a+x)} \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {b^4}{a x^4}-\frac {b^4}{a^2 x^3}+\frac {-2 a^2 b^2+b^4}{a^3 x^2}+\frac {2 a^2 b^2-b^4}{a^4 x}+\frac {\left (a^2-b^2\right )^2}{a^4 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{b d}\\ &=\frac {\left (2 a^2-b^2\right ) \csc (c+d x)}{a^3 d}+\frac {b \csc ^2(c+d x)}{2 a^2 d}-\frac {\csc ^3(c+d x)}{3 a d}+\frac {b \left (2 a^2-b^2\right ) \log (\sin (c+d x))}{a^4 d}+\frac {\left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{a^4 b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.19, size = 110, normalized size = 0.92 \begin {gather*} \frac {6 a b \left (2 a^2-b^2\right ) \csc (c+d x)+3 a^2 b^2 \csc ^2(c+d x)-2 a^3 b \csc ^3(c+d x)-6 b^2 \left (-2 a^2+b^2\right ) \log (\sin (c+d x))+6 \left (a^2-b^2\right )^2 \log (a+b \sin (c+d x))}{6 a^4 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.31, size = 111, normalized size = 0.92
method | result | size |
derivativedivides | \(\frac {-\frac {1}{3 a \sin \left (d x +c \right )^{3}}-\frac {-2 a^{2}+b^{2}}{a^{3} \sin \left (d x +c \right )}+\frac {\left (2 a^{2}-b^{2}\right ) b \ln \left (\sin \left (d x +c \right )\right )}{a^{4}}+\frac {b}{2 a^{2} \sin \left (d x +c \right )^{2}}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{4} b}}{d}\) | \(111\) |
default | \(\frac {-\frac {1}{3 a \sin \left (d x +c \right )^{3}}-\frac {-2 a^{2}+b^{2}}{a^{3} \sin \left (d x +c \right )}+\frac {\left (2 a^{2}-b^{2}\right ) b \ln \left (\sin \left (d x +c \right )\right )}{a^{4}}+\frac {b}{2 a^{2} \sin \left (d x +c \right )^{2}}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a +b \sin \left (d x +c \right )\right )}{a^{4} b}}{d}\) | \(111\) |
norman | \(\frac {-\frac {1}{24 a d}-\frac {\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )}{24 a d}+\frac {b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a^{2} d}+\frac {b \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a^{2} d}+\frac {\left (5 a^{2}-3 b^{2}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a^{3} d}+\frac {\left (5 a^{2}-3 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a^{3} d}+\frac {\left (7 a^{2}-4 b^{2}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{3} d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {b \left (2 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{4} d}+\frac {\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \ln \left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+a \right )}{a^{4} b d}-\frac {\ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b d}\) | \(289\) |
risch | \(-\frac {i x}{b}-\frac {2 i c}{b d}+\frac {2 i \left (6 a^{2} {\mathrm e}^{5 i \left (d x +c \right )}-3 b^{2} {\mathrm e}^{5 i \left (d x +c \right )}-8 \,{\mathrm e}^{3 i \left (d x +c \right )} a^{2}+6 b^{2} {\mathrm e}^{3 i \left (d x +c \right )}+3 i a b \,{\mathrm e}^{4 i \left (d x +c \right )}+6 a^{2} {\mathrm e}^{i \left (d x +c \right )}-3 b^{2} {\mathrm e}^{i \left (d x +c \right )}-3 i a b \,{\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{b d}-\frac {2 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{2} d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1+\frac {2 i a \,{\mathrm e}^{i \left (d x +c \right )}}{b}\right )}{a^{4} d}+\frac {2 b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{2} d}-\frac {b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{a^{4} d}\) | \(308\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 113, normalized size = 0.94 \begin {gather*} \frac {\frac {6 \, {\left (2 \, a^{2} b - b^{3}\right )} \log \left (\sin \left (d x + c\right )\right )}{a^{4}} + \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \sin \left (d x + c\right ) + a\right )}{a^{4} b} + \frac {3 \, a b \sin \left (d x + c\right ) + 6 \, {\left (2 \, a^{2} - b^{2}\right )} \sin \left (d x + c\right )^{2} - 2 \, a^{2}}{a^{3} \sin \left (d x + c\right )^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 198, normalized size = 1.65 \begin {gather*} -\frac {3 \, a^{2} b^{2} \sin \left (d x + c\right ) + 10 \, a^{3} b - 6 \, a b^{3} - 6 \, {\left (2 \, a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{2} + 6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} - {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) \sin \left (d x + c\right ) + 6 \, {\left (2 \, a^{2} b^{2} - b^{4} - {\left (2 \, a^{2} b^{2} - b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right )}{6 \, {\left (a^{4} b d \cos \left (d x + c\right )^{2} - a^{4} b d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 151, normalized size = 1.26 \begin {gather*} \frac {\frac {6 \, {\left (2 \, a^{2} b - b^{3}\right )} \log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a^{4}} + \frac {6 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \sin \left (d x + c\right ) + a \right |}\right )}{a^{4} b} - \frac {22 \, a^{2} b \sin \left (d x + c\right )^{3} - 11 \, b^{3} \sin \left (d x + c\right )^{3} - 12 \, a^{3} \sin \left (d x + c\right )^{2} + 6 \, a b^{2} \sin \left (d x + c\right )^{2} - 3 \, a^{2} b \sin \left (d x + c\right ) + 2 \, a^{3}}{a^{4} \sin \left (d x + c\right )^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.93, size = 227, normalized size = 1.89 \begin {gather*} \frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {7}{8\,a}-\frac {b^2}{2\,a^3}\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,a\,d}-\frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{b\,d}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a^2\,b-b^3\right )}{a^4\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^2\,d}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (7\,a^2-4\,b^2\right )-\frac {a^2}{3}+a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,a^3\,d\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}+\frac {\ln \left (a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+a\right )\,{\left (a^2-b^2\right )}^2}{a^4\,b\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________